<div id="menuCategorias">
  <ul>
    <?php foreach($categories as $category){ ?>
      <li>
        <a href="javascript:void(0)" onclick="loadSubcategories2('<?php echo $category->getId() ?>')">
          <?php echo $category->getDescription() ?></a>
      </li>
    <?php } ?>
  </ul>
  <div id="divAjaxLoadSubcategories" style="display: none;"></div>
  <div id="loading" style="display: none;text-align: center;">
    <?php echo image_tag('ajax-loader.gif') ?></div>
</div>